<template>
	<view class="main">
		<u-navbar :is-back="true" :title="i18n.navbar.Serve" :background="background" :border-bottom="false" title-color="#000000"
			back-icon-color="#000">
		</u-navbar>
		
		<iframe :src="link" v-show="iframeState" id="myiframe" scrolling="auto" frameborder="0" width="100%"  style="height: 92%;">
		</iframe>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				background: {
					backgroundColor: '#fff',
				},
				link: "",
				iframeState: false
			}
		},
		computed: {
			i18n() {
				return this.$t('message')
			},
		},
		onLoad() {
			this.serviceLink();
		},
		onShow() {
			this.lang()
		},
		methods: {
			lang() {
				this._i18n.locale = uni.getStorageSync('select')
			},
			serviceLink() {
				global.$http.request({
					url: '/api/admin/merchant/serviceLink',
					header: {
							'Authori-zation':  uni.getStorageSync('token') //自定义请求头信息
						},
					method: 'GET',
				}).then(res => {
					if (res.data.code == 200) {
						this.link = res.data.message;
						//this.link = "https://www.baidu.com";
						this.iframeState = true;
					}
				})
			},
		}
	}
</script>

<style lang="scss">
	page {
		font-family: PingFang SC;
		background-color: #f7f7f7;
		height: 100%;
		
		.main {

			.shop_info {
				font-size: 30rpx;
				font-family: PingFang SC;
				font-weight: 400;
				color: #304156;
				padding-right: 19rpx;
			}
		}
		.uni-page {
		    height: 100%;
		}
		.uni-page-wrapper {
		    height: 100%;
		}
		.uni-page-body {
		    height: 100%;
		}
		.main {
		    height: 100%;
		}
		
	}
</style>
